package com.senlingspace.payment.enums;

/**
 * 抖音错误码枚举
 * error_code
 *
 * @author lebronjames
 * @date 2024/08/15
 */
public enum DouyinErrorCodeEnum {

    SUCCESS(0, "成功", "成功"),
    ACCESS_TOKEN_EXPIRED_OR_INVALID(2190001, "access_token过期或无效", "规范token刷新机制，检查是否有测试环境在同步刷新token"),
    ACCESS_TOKEN_INVALID(2190002, "access_token无效", "调用接口重新生成access_token"),
    APP_PERMISSION_DENIED(2190004, "应用未获得该能力", "请去https://open.douyin.com/申请应用申请接口权限"),
    ACCESS_TOKEN_EXPIRED(2190008, "access_token过期", "规范token刷新机制，检查是否有测试环境在同步刷新token"),
    INVALID_PARAMETER(2119001, "参数不合法", "更换参数"),
    SYSTEM_BUSY(2119002, "系统繁忙，请稍候再试", "重试"),
    TOO_FREQUENT_REQUEST(2119003, "请求太过频繁，请稍后再试", "重试"),
    APP_NOT_AUTHORIZED(2119005, "应用未获商家授权", "联系合作商家在商家后台发起授权，并在服务商后台同意授权"),
    BUSINESS_ERROR(3000001, "根据实际业务错误返回", "对照接口文档规范参数并重试"),
    MISSING_PARAMETER(4000001, "根据实际业务错误返回", "补充参数"),
    PARAMETER_ERROR(4000002, "根据实际业务错误返回", "对照接口文档规范参数并重试"),
    CONTACT_DOUYIN(5000001, "根据实际业务错误返回", "联系抖音处理"),
    STORE_VERIFICATION_ERROR(3000002, "核销门店错误", "检查核销门店重试"),
    NO_VERIFICATION_RECORD(3000020, "无核销记录可撤销", "查看是否核销过再重试");



    private final long code;
    private final String description;
    private final String troubleshooting;

    DouyinErrorCodeEnum(long code, String description, String troubleshooting) {
        this.code = code;
        this.description = description;
        this.troubleshooting = troubleshooting;
    }

    public long getCode() {
        return code;
    }

    public String getDescription() {
        return description;
    }

    public String getTroubleshooting() {
        return troubleshooting;
    }
}
